package com.hxht.cmp.module;

import com.hxht.cmp.entity.User;
import com.hxht.cmp.service.CaseReviewService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by gaozikun on 2017/7/21 0021.
 */
@Controller
@RequestMapping("case_count")
public class CaseCountModule {

    @Autowired
    private CaseReviewService caseReviewService;

    @RequestMapping("open_court_number_count")
    public ModelAndView openCourtNumberCount(String caseType, String startTime, String endTime) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("caseType", caseReviewService.getAllCaseType());
        modelAndView.setViewName("count/open_court_number_count");
        return modelAndView;
    }

    @RequestMapping("open_court_time_count")
    public ModelAndView openCourtTimeCount(String caseType, String startTime, String endTime) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("caseType", caseReviewService.getAllCaseType());
        modelAndView.setViewName("count/open_court_time_count");
        return modelAndView;
    }

    @RequestMapping("court_on_time_count")
    public ModelAndView openCourtOnTimeCount() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("count/court_on_time_count");
        return modelAndView;
    }

    @RequestMapping("technology_court_rate")
    public ModelAndView technologyCourtRate() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("count/technology_court");
        return modelAndView;
    }
}
